cache trong mvc

165

cache trong mvc -

DataSet ds = System.Web.HttpContext.Current.Cache["CacheName"] as DataSet;
if (ds == null)
{
ds = CategoryDB.GetLastestNews(CategoryID, NoOfNews, LanguageCode);
System.Web.HttpContext.Current.Cache.Insert("CacheName", ds, null, DateTime.MaxValue, TimeSpan.FromMinutes(15));
}

cache trong mvc -

System.Web.HttpContext.Current.Cache.Insert("CacheName", bien, null, DateTime.MaxValue, TimeSpan.FromMinutes(15));

Comments

Submit
0 Comments